home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr27
/
iswht10.zip
/
IW_DEMO.BAT
< prev
Wrap
DOS Batch File
|
1995-03-26
|
3KB
|
95 lines
@echo off
REM Demonstration File for IsWhat 1.0
cls
echo This batchfile will demonstrate some of the uses and results of
echo using IsWhat in your batch files.
echo.
echo You can modify the errorlevel checks to match current
echo days, month etc. to get correct and incorrect answers, so you
echo see the difference.
echo.
echo Press Ctl-C to ABORT, or any other to continue....
echo Pressing Ctl-C at any keypress prompt will abort the Demo.
pause > nul
cls
echo Using IsWhat DOW we can determine which day of the week it is... 1-7
echo Let's check to see if its Saturday, thats day 7...
echo Command: IsWhat DOW
echo.
iswhat dow
echo:
if not errorlevel 7 goto Wrongday
if errorlevel 7 goto goodday
:wrongday
echo Nope... not Staurday...
goto endday
:goodday
echo Yep, got the right day!
:endday
echo:
echo Press a key......
pause > nul
cls
echo Using DOM determines what day of the month it is, 1-31
echo lets check for the 25th....
Echo Command: IsWhat dom
echo.
iswhat dom
echo:
if not errorlevel 25 echo It's not the 25th today...
if errorlevel 25 echo It's the 25th alright!
echo Press a key....
pause > nul
cls
echo Using DOY will return the Day of Year, 1-365
echo checking for day 85.....
echo Command: IsWhat doy
echo.
iswhat doy
if not errorlevel 85 echo Nope.....
if errorlevel 85 echo yep...day 85!
echo.
echo press a key.....
pause > nul
cls
echo Suppose we need to perform a job if its March?
echo Using the MONTH command, we can.... March would be errorlevel 3...
echo Command: IsWhat month
echo.
iswhat month
echo.
if not errorlevel 3 echo Wrong Month....
if errorlevel 3 echo Yep, its March... now what??
echo.
echo press a key.....
pause > nul
cls
echo Lets look at the calendar function.... When the calendar is displayed
echo you can scroll around, play with the arrow keys, PgUp/Dn, Home/End.
echo Pressing ENTER will exit and display the date you selected, pressing
echo ESC will simply Exit.
echo Command: IsWhat calendar
echo.
echo Press a key to experience the Calendar function....
pause > nul
iswhat calendar
echo.
echo press a key......
pause > nul
cls
echo IsWhat 1.0 (c)Copyright 1995 Rand Nowell - RaLin Enterprises
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo These have been very basic examples.... some things like the
echo DATENAME function must be checked from the command line.
echo And of course, with some creative batchfile writting, you can
echo make great use of IsWhat!
echo.
echo Hope you find IsWhat a handy tool!
echo IsWhat 1.0 from "Cowboy Software!"
echo.
echo Refer to ISWHAT.DOC for detailed information on functions.
echo This is a Free program, but any donations are WELCOME!!